const { defineConfig } = require('@vue/cli-service')
const { execSync } = require('child_process');

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: config => {
    if (process.env.NODE_ENV === 'production') {
      console.log('🛠️ 正在构建：生成 version.json...');
      execSync('node ./scripts/write-version.js');
    }
  }
})
